<template>
  <div class="home-swiper">
    <swiper :options="swiperOption">
      <swiper-slide v-for="item in list" :key="item.id">
        <img class="swiper-img" :src="item.imgUrl">
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
export default {
  name: 'home-swiper',
  props: {
    list: Array
  },
  data() {
    return {
      swiperOption: {
        loop: true,
        pagination: {
          el: '.swiper-pagination'
        }
      },
    }
  }
}
</script>

<style lang="stylus" scoped>
.home-swiper 
  overflow hidden
  height 0
  padding-bottom 30.47%
  /deep/ .swiper-pagination-bullet-active
    background #fff
  .swiper-img
    width 100%
</style>